package com.xiaoyu.studyworkspace.mapper;

import com.xiaoyu.studyworkspace.pojo.MethodName;
import com.xiaoyu.studyworkspace.pojo.Prediction;
import com.xiaoyu.studyworkspace.pojo.UserRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PredictionMapper {
    public Prediction selectLastMethods(@Param("methodName") String methodName);

    public List<MethodName> selectMethodNames();

    public List<MethodName> selectMethodNamesByCode(@Param("userRelations")List<UserRelation> userRelations);

    public void updateLastMethod(Prediction prediction);

    public void updateLastMethodPred(Prediction prediction);

    public void insertNewPrediction(Prediction predictionNew);

    public List<Prediction> selectRecordByMethodName(@Param("methodName") String methodName);

    public void UpdateMethodName(@Param("name") String name, @Param("winPercentage") double winPercentage);

}
